import { getByCode } from '~/api/basicConfig/index'

export const state = () => ({
  footers: []
})

export const mutations = {
  reset(state, footers) {
    state.footers = footers
  }
}

export const actions = {
  async loadFooters(context) {
    const data = await getByCode({
      classifyCode: 'footer'
    })
    context.commit('reset', data.data.basicItems)
  }
}
